package com.vivo.customer.dao;

import com.vivo.customer.entity.CompanyHistory;
import com.vivo.customer.entity.CompanyHistoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface CompanyHistoryMapper {
    int countByExample(CompanyHistoryExample example);

    int deleteByExample(CompanyHistoryExample example);

    int deleteByPrimaryKey(String id);

    int insert(CompanyHistory record);

    int insertSelective(CompanyHistory record);

    List<CompanyHistory> selectByExample(CompanyHistoryExample example);

    CompanyHistory selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") CompanyHistory record, @Param("example") CompanyHistoryExample example);

    int updateByExample(@Param("record") CompanyHistory record, @Param("example") CompanyHistoryExample example);

    int updateByPrimaryKeySelective(CompanyHistory record);

    int updateByPrimaryKey(CompanyHistory record);
    
    @Select("SELECT * FROM company_history WHERE source_id=#{sourceId}")
    @ResultMap("BaseResultMap")
    CompanyHistory  getBySourceId(@Param("sourceId") String sourceId);
}